<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@page import="java.util.Date"%>
<%Date date=new Date();%>
<html>
<head>
	<title>养殖企业信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript" src="${ctxScript}/bus/bus.js?<%=date.getTime()%>"></script>
	<link href="${ctxCss}/common/listPage.css" type="text/css" rel="stylesheet" />
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
	<style>
		.input-medium {
			width: 52%;
		}
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/bus/ent/viewFarmInfo">信息查看</a></li>

	</ul>
	<form:form id="searchForm" modelAttribute="ent" action="${ctx}/bus/ent/viewFarmInfo" method="post" class="breadcrumb form-search ">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			<li style="width:18%"><label>养殖场名称:</label><form:input path="entName" htmlEscape="false" maxlength="50" class="input-medium" /></li>
			<li style="width:18%"><label>法人姓名:</label><form:input path="legalPerson" htmlEscape="false" maxlength="50" class="input-medium" /></li>
			<li style="width:18%"><label>养殖种类:</label>
				<form:select path="entHistory.farmType" class="input-medium"  maxlength="4" style="width:50%;height:30px;" >
					<option value="">请选择</option>
					<form:options items="${fns:getDictList('animalType')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
				</form:select></li>
			<li style="width:18%"><label>审核通过时间</label>
				<input name="entHistory.createDate" type="text" readonly="readonly" maxlength="20" style="width:50%;" class="input-medium Wdate"
					   value="<fmt:formatDate value="${ent.entHistory.createDate}" pattern="yyyy-MM-dd"/>"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"
				/>
			</li>
			<li class="btns" style="width:18%"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
					<th>序号</th>
					<th>审核通过时间</th>
					<th>养殖场名称</th>
					<th>法人姓名</th>
					<th>养殖种类</th>
					<th>存栏量</th>
					<th>年出栏量</th>
					<th>联系电话</th>
				<shiro:hasPermission name="bus:ent:view"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="ent" varStatus="status">
			<tr>
					<td>
						${status.index+1+(page.pageNo-1)*page.pageSize}
					</td>

					<td>
						<fmt:formatDate value="${ent.entHistory.createDate}" pattern="yyyy-MM-dd"/>
					</td>

					<td>
							${ent.entName}
					</td>

					<td>
							${ent.legalPerson}
					</td>

					<td>
							${ent.entHistory.farmType}
					</td>

					<td>
							${ent.entHistory.initialDeposit}
					</td>

					<td>
							${ent.entHistory.yearDeposit}
					</td>

					<td>
							${ent.mobile}
					</td>
				<shiro:hasPermission name="bus:ent:view"><td>
					<a href="javascript:;" onclick="checkPage('${ent.entHistory.auditId}','${ent.id}','1','${ent.auditStatus}','','1')">查看</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>